package com.evil.application.pojo.dto.pack;

import cn.hutool.core.bean.BeanUtil;
import com.evil.application.pojo.entity.ApplicationPackage;
import com.evil.common.application.dto.permission.app.AppPermissionDTO;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 应用包基础信息 返回实体
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@NoArgsConstructor
public class PackageBaseInfoRespDTO {

    /**
     * 应用包id
     */
    private Long packageId;

    /**
     * 应用包名称
     */
    private String packageName;

    /**
     * 权限状态(0:全体, 1:指定)
     */
    private Integer permissionStatus;

    /**
     * 权限
     */
    private List<AppPermissionDTO> permissions;

    public PackageBaseInfoRespDTO(ApplicationPackage applicationPackage) {
        BeanUtil.copyProperties(applicationPackage, this);
    }
}
